package com.whosly.demo.jmh.util;

import com.carrotsearch.sizeof.RamUsageEstimator;

/**
 * @author fengyang
 * @date 2023/6/2 下午5:22
 * @see <a href="fengyang@stoneatom.com">mailTo: fengyang@stoneatom.com</a>
 */
public class SizeOfUtil
{
    /**
     * 计算对象在内存中的大小
     */
    public static final long sizeOf(Object t){
        return RamUsageEstimator.sizeOf(t);
    }
}
